﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace lcps.Web
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_login_Click(object sender, EventArgs e)
        {
            string name = this.txt_name.Text;
            string pass = this.txt_pass.Text;
            DataSet ds = new lcps.BLL.userinfo().GetList(" username='"+name+"' and userpwd='"+pass+"' ");

            if (ds.Tables[0].Rows.Count > 0)
            {
                Session["login"] = ds;

                Response.Redirect("admin/main.aspx");


            }
            else
            {
                Maticsoft.Common.MessageBox.Show(this,"用户名密码错误！");
            }
        }
    }
}
